{% extends 'cmdb/asset.html' %}
{% block title %}物理服务器列表{% endblock %}


{% block main %}
    <div class="tab-content">
        <div class="tab-pane fade in active">
            <div class="row">
                        <div class="panel-heading" style="background-color: white">
                            <B class="fa fa-th"> 服务器信息表</B>
                            <div style="float: right;">
                                <style>
                                    .file{border:1px solid #333333;color:#666666;background:#eeeeee;font:normal 12px Tahoma;height:18px}
                                </style>
                                <form method="post" action="/cmdb/asset_table/" enctype="multipart/form-data">
                                    {{ uf }}
                                    <input type="submit" value="批量导入">
                                </form>
                            </div>
                            <h5 style="color: red"> {{ info }}</h5>
                        </div>

                        <div class="panel-body">
                            <div class="dataTable_wrapper">
                                <table class="table table-striped table-bordered table-hover" id="dataTables-example">
                                    <thead>
                                        <tr>
                                            <th>资产编号</th>
                                            <th>设备类型</th>
                                            <th>服务器IP</th>
                                            <th>远控卡IP</th>
                                            <th>数据中心</th>
                                            <th>机房编号</th>
                                            <th>机柜编号</th>
                                            <th>系统类型</th>
                            <!--<th>CPU型号、数目</th>
                            <th>磁盘大小、数目</th>
                            <th>内存大小、数目</th>
                            <th>磁盘阵列</th>
                            <th>网卡类型、数目</th>
                            <th>电源数目</th>-->
                                            <th>服务编号</th>
                            <!--<th>购买时间</th>
                            <th>过期时间</th>-->
                                            <th>备注</th>
                                            <th>管理</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        {% for i in a %}
                                        <tr class="gradeA">
                                            <td>{{ i.asset_num }}</td>
                                            <td>{{ i.type }}</td>
                                            <td><a href="{{ i.assetget_url.get_host_url }}" >{{ i.server_ip }}</a></td>
                                            <td>{{ i.remote_ip }}</td>
                                            <td>{{ i.data_center }}</td>
                                            <td>{{ i.room_num }}</td>
                                            <td>{{ i.rack_num }}</td>
                                            <td>{{ i.system_type }}</td>
                            <!--<td>{{ i.cputype_num }}</td>
                            <td>{{ i.disksize_num }}</td>
                            <td>{{ i.memsize_num }}</td>
                            <td>{{ i.disk_raid }}</td>
                            <td>{{ i.card_type_num }}</td>
                            <td>{{ i.power_num }}</td>-->
                                            <td>{{ i.service_num }}</td>
                            <!--<td>{{ i.buy_time }}</td>
                            <td>{{ i.expiration_time }}</td>-->
                                            <td class="center">{{ i.note }}</td>
                                            <td><a href="/cmdb/asset_update/?asset_num={{ i.asset_num }}"><button class="btn btn-warning btn-xs" type="button">更改</button></a> <a href="/cmdb/asset_del/?asset_num={{ i.asset_num }}"><button class="btn btn-danger btn-xs" type="button">删除</button></a></td>
                                        </tr>
                                    {% endfor %}
                                    </tbody>
                                </table>
                            </div>
                        </div>
            </div>
        </div>
    </div>
{% endblock %}

